<div class="div-top">
<span style="font-size: 20px;float:left;">{{menu_name}}</span>
</div>

<form class="div-find form-inline">
	<div class="form-group">
		<label class="form-label">学年：</label>
		<select class="form-control" ng-options="aca.prop_pk as aca.prop_value for aca in academics" ng-model="form.academic" ng-change="findClass()">
			<option value="">==请选择==</option>
		</select>
		<label class="form-label">学期：</label>
		<select class="form-control" ng-options="sem.prop_pk as sem.prop_value for sem in semesters" ng-model="form.semester" ng-change="findClass()">
			<option value="">==请选择==</option>
		</select>
	</div>
	<div class="form-group" ng-if="unitList.length > '1'">
        <label class="form-label">校区：</label>
        <select class="form-control" ng-options="unit.id as unit.showname for unit in unitList" ng-model="form.fk_unit" ng-change="findTime()">
            <option value="">==请选择==</option>
        </select>
    </div>
	<div class="form-group" ng-if = "form.weekunit == '1' && form.weekunit != undefined">
		<label class="form-label">单/双周：</label>
		<select class="form-control"  ng-model="form.week" ng-change="find()">
			<option value="">==请选择==</option>
            <option value="1">单周</option>
            <option value="2">双周</option>
		</select>
	</div>
  	<button ng-click="update()" type="button" class="btn btn-dark"><i class="iconfont icon-set"></i>&nbsp;设置</button>
</form>


  
<!-- Table -->
<div class="div-table">
<div class="panel panel-primary">
  <!-- Default panel contents -->
  <div class="panel-heading" style="background: none;text-align: center;">
  <span style="font-weight: bold;color:#333;">课程表</span>
  </div>
  
  <!-- Table -->
  <table class="table table-bordered" style="text-align: center;">
  	<thead>
  		<tr>
  			<td style="width:25%;" colspan="2">
					<span ng-if="form.week == '1'">单周</span>
					<span ng-if="form.week == '2'">双周</span>
				</td>
			<td>星期一</td>
  			<td>星期二</td>
  			<td>星期三</td>
  			<td>星期四</td>
  			<td>星期五</td>
  		</tr>
  	</thead>
    <tbody ng-switch on="page.current_num">
			<tr ng-switch-when="0">
				<td colspan="100" class="NoSelectHistory">查询无记录</td>
			</tr>
			<tr ng-repeat='row in dataList'>
				<td style="width:5%;" ng-if="0 == $index" rowspan="{{row.forenoon}}" valign="middle">上<br/>午</td>
				<td style="width:5%;" ng-if="row.forenoon == $index" rowspan="{{row.afternoon}}" valign="middle">下<br/>午</td>
				<td style="width:5%;" ng-if="row.forenoon+row.afternoon == $index" valign="middle"></td>
				<td style="width:20%;">{{row.course_time}}</td>
				<td style="width:15%;">
					<span ng-if="row.course1!=null && row.class1!=null" class="class{{row.classno1}}">{{row.course1}}-{{row.class1}}</span>
				</td>
				<td style="width:15%;">
					<span ng-if="row.course2!=null && row.class2!=null" class="class{{row.classno2}}">{{row.course2}}-{{row.class2}}</span>
				</td>
				<td style="width:15%;">
					<span ng-if="row.course3!=null && row.class3!=null" class="class{{row.classno3}}">{{row.course3}}-{{row.class3}}</span>
				</td>
				<td style="width:15%;">
					<span ng-if="row.course4!=null && row.class4!=null" class="class{{row.classno4}}">{{row.course4}}-{{row.class4}}</span>
				</td>
				<td style="width:15%;">
					<span ng-if="row.course5!=null && row.class5!=null" class="class{{row.classno5}}">{{row.course5}}-{{row.class5}}</span>
				</td>
			</tr>
		</tbody>
  </table>
</div>
</div>
